<div ng-controller="UimodsCtrl" ng-init="addAction()" class="sui-form form-horizontal">
    <ul class="sui-breadcrumb">
        <li><a href="#/uimods/list">{{'UI模块'| translate}}</a></li>
        <li class="active">
            {{uimods.uimods_id?"编辑":"创建"|translate}}
        </li>
    </ul>
    <form name="xform" novalidate ng-submit="save()">
        <div class="control-group">
            <label class="control-label v-top">{{'模块名称'|translate}}：</label>
            <div class="controls">
                <input ng-model="uimods.title" type="text" name="title" class="input-large">
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top">{{'小程序类型'|translate}}：</label>
            <div class="controls">
                <uimods-ctype ng-show="!uimods.uimods_id" ng-model="uimods.ctype" dft="1"></uimods-ctype>
                <uimods-ctype ng-show="uimods.uimods_id" ng-model="uimods.ctype" stype="1"></uimods-ctype>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top">{{'所属页面'|translate}}：</label>
            <div class="controls">
                <uimods-type ng-if="!uimods.uimods_id" ng-model="uimods.types" dft="1"></uimods-type>
                <uimods-type ng-if="uimods.uimods_id" ng-model="uimods.types" stype="1"></uimods-type>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top">{{'模块类型'|translate}}：</label>
            <div class="controls">
                <ui-mods-list ng-show="!uimods.uimods_id" ng-model="xmod" sid="{{uimods.subtype}}" ofpage="{{uimods.types}}"></ui-mods-list>
                <div ng-show="uimods.uimods_id">{{xmod.name}}</div>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top">{{'模块唯一标识'|translate}}：</label>
            <div class="controls">
                <input ng-model="uimods.name" type="text" name="name" class="input-medium" ng-if="!uimods.uimods_id">
                <span ng-show="uimods.uimods_id"> {{uimods.name}}</span>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top">{{'是否必须模块'|translate}}：</label>
            <div class="controls">
                <ui-mods-dft ng-model="uimods.dft" dft="1"></ui-mods-dft>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top">{{'模块数据'|translate}}：</label>
            <div class="controls">
                <p>新：<textarea type="text" class="input-xlarge" style="width: 500px;height:100px;" ng-model="data"></textarea>
                </p>
                <p>旧：{{uimods.data}}</p>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top">{{'描述'|translate}}：</label>
            <div class="controls">
                <textarea type="text" class="input-xlarge" style="width: 500px;height: 100px;" ng-model="uimods.note">
                </textarea>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label"></label>
            <div class="controls">
                <button type="submit" class="sui-btn btn-primary" ng-disabled="!xform.$valid">
                    {{'save' | translate}}
                </button>
            </div>
        </div>
    </form>
</div>
